# -*- coding: UTF-8 -*-

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
import time

def login():
    driver=webdriver.Chrome();
    driver.get("file:///D://aut//python100//Day49//selenium.html")
    time.sleep(3)
    driver.find_element_by_name("username").send_keys("rabbit")
    driver.find_element_by_name("password").send_keys("love")
    driver.find_element_by_id("sub").send_keys(Keys.ENTER)
    time.sleep(5)
    print(driver.current_url)
    print(driver.title)
    driver.quit()

login()
